<!DOCTYPE html>
<html lang="en" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../layui/css/layui.css">
    <link rel="stylesheet" href="../css/custom.form.css">
    <style>
        .layui-form-label {
            width: 180px;
        }
        .layui-form-label {
            padding: 9px 0px;
            text-align: center;
        }

        .layui-btn {
            padding: 0 10px;
        }

        .more-container {
            display: none;
        }
        .layui-input-block {
            margin-left: 150px;
        }
    </style>
</head>
<body>
<div class="panel panel-default operation" id="productiveminAdd" hidden>
    <div class="panel-heading title"></div>
    <div class="layui-card-body">
        <form class="layui-form " action="" lay-filter="info" style="width: 1000px;margin-top: 10px">
            <input name="tBBH" hidden/>
            <div class="layui-form-item" id="area-picker">
                <div class="layui-form-label" style="display: none">所在省/隐藏项</div>
                <div class="layui-input-inline" style="width: 200px; display: none">
                    <select name="province" class="province-selector" data-value="辽宁省" lay-filter="province-1"
                            style="display:none">
                        <option value="">请选择省</option>
                    </select>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">*矿区所在地市</label>
                    <div class="layui-input-inline">
                        <select name="xZS" class="xZS-selector" data-value="沈阳市" lay-filter="xZS-1">
                            <option value="">请选择市</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">*矿区所在县</label>
                    <div class="layui-input-inline">
                        <select name="xZX" class="xZX-selector" data-value=" " lay-filter="xZX-1">
                            <option value="">请选择县/区</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">图斑位置</label>
                    <div class="layui-input-inline">
                        <input type="text" name="wZ" placeholder="请描述图斑所在位置，具体到乡镇村组" autocomplete="off"
                               class="layui-input" lay-verify="required">
                    </div>
                </div>
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">*图斑面积</label>
                    <div class="layui-input-inline">
                        <input type="text" name="tBMJ" placeholder="请输入图斑面积，损毁或恢复治理面积" autocomplete="off"
                               class="layui-input" lay-verify="required|P">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">*中心点经度</label>
                    <div class="layui-input-inline">
                        <input type="text" name="kFX" placeholder="请输入中心点经度" lay-verify="required|J" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">*中心点纬度</label>
                    <div class="layui-input-inline">
                        <input type="text" name="kFY" placeholder="请输入中心点纬度" lay-verify="required|W" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">损毁类型</label>
                    <div class="layui-input-inline">
                        <input type="sHLX" id="sHLX" name="sHLX" hidden/>
                        <select class="layui-select" lay-filter="select-sHLX" lay-verify="required">
                            <option value="WS">挖损</option>
                            <option value="YZ">压占</option>
                            <option value="TX">塌陷</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">图斑属性</label>
                    <div class="layui-input-inline">
                        <input type="tBSX" id="tBSX" name="tBSX" hidden/>
                        <select class="layui-form-select" lay-filter="select-tBSX" lay-verify="required">
                            <option value="LTKC1">露天矿场</option>
                            <option value="DMC">堆煤场</option>
                            <option value="XMC">洗煤厂</option>
                            <option value="MGSD">煤矸石堆</option>
                            <option value="QTKSDC">其他矿石堆场</option>
                            <option value="XKC">选矿厂</option>
                            <option value="XKC2">选矿池</option>
                            <option value="BTDC">表土堆场</option>
                            <option value="NPTC">内排土场</option>
                            <option value="WPTC">外排土场</option>
                            <option value="FSD">废石堆</option>
                            <option value="WKK">尾矿库</option>
                            <option value="GYGCJZ">工业广场建筑</option>
                            <option value="TXK">塌陷坑</option>
                            <option value="YQJC">油气井场</option>
                            <option value="YQCZ">油气场站</option>
                            <option value="ZYK">炸药库</option>
                            <option value="KSDL">矿山道路</option>
                            <option value="DLF">地裂缝</option>
                            <option value="BT">崩塌</option>
                            <option value="HP">滑坡</option>
                            <option value="QTTBSX">其他</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">三调地类</label>
                    <div class="layui-input-inline">
                        <input type="sDDL" id="sDDL" name="sDDL" hidden/>
                        <select class="layui-form-select" lay-filter="select-sDDL" lay-verify="required">
                            <option value="01">耕地</option>
                            <option value="02">园地</option>
                            <option value="03">林地</option>
                            <option value="04">草地</option>
                            <option value="05">商服用地</option>
                            <option value="06">工矿仓储用地</option>
                            <option value="07">住宅用地</option>
                            <option value="08">公共管理与公共服务用地</option>
                            <option value="09">特殊用地</option>
                            <option value="10">交通运输用地</option>
                            <option value="11">水域及水利设施用地</option>
                            <option value="12">其他用地</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">所有权权属</label>
                    <div class="layui-input-inline">
                        <input id="sYQ" name="sYQ" hidden/>
                        <select class="layui-select" lay-filter="select-sYQ" lay-verify="required">
                            <option value="GYTDSYQ">国有土地所有权</option>
                            <option value="JTTDSYQ">集体土地所有权</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">使用权权属</label>
                    <div class="layui-input-inline">
                        <input id="sHYQ" name="sHYQ" hidden/>
                        <select class="layui-select" lay-filter="select-sHYQ" lay-verify="required">
                            <option value="GYSYQ">国有土地使用权</option>
                            <option value="JTSYQ">集体土地使用权</option>
                            <option value="QTSYQ">其他</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">有无合法用地手续</label>
                    <div class="layui-input-inline">
                        <input id="yDSX" name="yDSX" hidden/>
                        <select class="layui-select" lay-filter="select-yDSX" lay-verify="required">
                            <option value="1">有</option>
                            <option value="0">无</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">采矿权证编号</label>
                    <div class="layui-input-inline">
                        <input type="text" name="kQBH" placeholder="无" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">采矿权名称</label>
                    <div class="layui-input-inline">
                        <input type="text" name="kQMC" placeholder="无" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">采矿权证有效期起</label>
                    <div class="layui-input-inline">
                        <input type="text" id="kQQXQ" name="kQQXQ" placeholder="请输入采矿权证有效期，例如：XX年-XX年"
                               autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">采矿权证有效期止</label>
                    <div class="layui-input-inline">
                        <input type="text" id="kQQXZ" name="kQQXZ" placeholder="请输入采矿权证有效期，例如：XX年-XX年"
                               autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">矿种</label>
                    <div class="layui-input-inline">
                        <input type="text" name="kZ" placeholder="请输入主要开采矿种" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">开采方式</label>
                    <div class="layui-input-inline">
                        <input id="kCFS" name="kCFS" hidden/>
                        <select class="layui-select" lay-filter="select-kCFS" lay-verify="required">
                            <option value="DXKC">地下开采</option>
                            <option value="LTKC">露天开采</option>
                            <option value="LJLC">露井联采</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">修复情况</label>
                    <div class="layui-input-inline">
                        <input id="zLQK" name="zLQK" hidden/>
                        <select class="layui-select" lay-filter="select-zLQK" lay-verify="required">
                            <option value="WZL">未修复</option>
                            <option value="ZZZL">正在修复</option>
                            <option value="YHFZL">已修复完成</option>
                            /*（若选C，转入已修复/复垦图斑信息）
                        </select>
                    </div>
                </div>
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">实地治理面积</label>
                    <div class="layui-input-inline">
                        <input type="text" name="zLMJ" placeholder="请输入实地核查测量的治理面积" autocomplete="off"
                               class="layui-input" lay-verify="required|O">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">拟修复时间</label>
                    <div class="layui-input-inline">
                        <input type="text" id="nXFSJ" name="nXFSJ" placeholder="未修复填写拟修复时间，正在修复填写预期修复结束时间（年月）"
                               autocomplete="off"
                               class="layui-input" lay-verify="required">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">现场照片:</label>
                    <div class="layui-input-inline">
                        <input type="text" name="xCZP" placeholder="请输入核查现场的照片存储地址" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">核查单位名称</label>
                    <div class="layui-input-inline">
                        <input type="text" name="hCDW" placeholder="请输入核查单位名称" lay-verify="required" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">核查人员姓名</label>
                    <div class="layui-input-inline">
                        <input type="text" name="hCRY" placeholder="请输入核查人员姓名" lay-verify="required" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">核查具体日期</label>
                    <div class="layui-input-inline">
                        <input type="text" id="hCRQ" name="hCRQ" placeholder="请输入核查具体日期" lay-verify="required"
                               autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <!--                <div class="layui-inline">-->
                <!--                    <label class="layui-form-label">切图文件存储地址</label>-->
                <!--                    <div class="layui-input-inline">-->
                <!--                        <input type="text" name="qTDZ" placeholder="请输入切图文件存放的物理地址" autocomplete="off"-->
                <!--                               class="layui-input">-->
                <!--                    </div>-->
                <!--                </div>-->
            </div>
            <div class="layui-form-item">
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">项目单位</label>
                    <div class="layui-input-inline">
                        <input type="text" name="xMDW" placeholder="项目实施单位" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">实施主体</label>
                    <div class="layui-input-inline">
                        <input type="text" name="sSZT" placeholder="治理/复垦工程实施单位" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">复垦/治理时间</label>
                    <div class="layui-input-inline">
                        <input type="text" id="fKSJ" name="fKSJ" placeholder="请输入复垦/治理时间" lay-verify="required"
                               autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">验收时间</label>
                    <div class="layui-input-inline">
                        <input type="text" id="ySSJ" name="ySSJ" placeholder="请输入验收时间" lay-verify="required"
                               autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">组织验收单位</label>
                    <div class="layui-input-inline">
                        <input type="text" name="ySDW" placeholder="无" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">验收结论</label>
                    <div class="layui-input-inline">
                        <input id="ySJL" name="ySJL" hidden/>
                        <select class="layui-select" lay-filter="select-ySJL" lay-verify="required">
                            <option value="TG">通过</option>
                            <option value="YTJTG">有条件通过</option>
                            <option value="WTG">未通过，整改</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-form-item" id="area-type">
                    <div class="layui-form-label" style="display: none">类型/隐藏项</div>
                    <div class="layui-input-inline" style="width: 200px; display: none">
                        <select name="one" class="one-selector" data-value="用地" lay-filter="one-1" style="display:none">
                            <option value=""></option>
                        </select>
                    </div>
                    <div class="layui-inline" style="margin-top: 10px">
<!--                        <label class="layui-form-label" style="width: 10px"> </label>-->
                        <label class="layui-form-label">治理/复垦后土地利用类型</label>
                        <div class="layui-input-inline">
                            <div class="layui-input-inline">
                                <select name="yDFL" class="yDFL-selector" data-value="农用地" lay-filter="yDFL-1">
                                    <option value="">请选择分类类型</option>
                                </select>
                            </div>
                        </div>
                        <label class="layui-form-label" style="width: 30px"> </label>
                        <div class="layui-input-inline">
                            <select name="fKFX" class="fKFX-selector" data-value="0101水浇地" lay-filter="fKFX-1">
                                <option value="">请土地利用类型</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-inline" style="margin-top: 10px">
                    <label class="layui-form-label">总体投资（万元）</label>
                    <div class="layui-input-inline">
                        <input type="text" name="zTTZ" placeholder="无" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item" style="text-align: center;">
                <div class="layui-input-block">
                    <button type="submit" class="layui-btn" lay-submit="" lay-filter="submit">保存</button>
                    <button class="layui-btn layui-btn-primary" id="btn_cancel">返回</button>
                </div>
            </div>
        </form>
    </div>
</div>

<div class="table_div">
    <div id="searchParam" shiro:hasPermission="productivemineNew:list">
        <form class="layui-form " action="" lay-filter="info">
            <div class="layui-form-item">
                <div class="layui-fluid">
                    <div class="layui-row">
                        <div class="layui-form-item" id="area-pro">
                            <div class="layui-form-label" style="display: none">所在省/隐藏项</div>
                            <div class="layui-input-inline" style="width: 200px; display: none">
                                <select name="pro" class="pro-selector" data-value="辽宁省" lay-filter="pro-1"
                                        style="display:none">
                                    <option value="">请选择省</option>
                                </select>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">矿区所在市</label>
                                <div class="layui-input-inline">
                                    <select name="ZS" class="ZS-selector" data-value="" lay-filter="ZS-1">
                                        <option value="">请选择市</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">矿区所在县</label>
                                <div class="layui-input-inline">
                                    <select name="ZX" class="ZX-selector" data-value=" " lay-filter="ZX-1">
                                        <option value="">请选择县/区</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <button class="layui-btn" lay-submit lay-filter="fsjl"><i
                                            class="layui-icon layui-icon-search"></i>查询
                                    </button>
                                    <button type="reset" class="layui-btn layui-btn-primary"><i
                                            class="layui-icon layui-icon-refresh"></i>重置
                                    </button>
                                    <button class="layui-btn layui-btn-normal more-btn" lay-filter="more"><i
                                            class="layui-icon layui-icon-addition"></i>展开
                                    </button>
                                </div>
                            </div>
                        </div>
                        <div class="more-container">
                            <div class="layui-inline">
                                <label class="layui-form-label">核查单位</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="content" class="layui-input" id="content"
                                           placeholder="请输入核查单位">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">核查人员</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="hCRY" placeholder="请输入核查人员姓名" autocomplete="off"
                                           class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">单位名称</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="mobile" class="layui-input" id="mobile"
                                           placeholder="请输入单位名称">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">损毁类型</label>
                                <div class="layui-input-inline">
                                    <select id="key-sHLX" name="sHLX" class="layui-select" lay-filter="">
                                        <option value="">请选择损毁类型</option>
                                        <option value="01">挖损</option>
                                        <option value="02">压占</option>
                                        <option value="03">塌陷</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">图斑属性</label>
                                <div class="layui-input-inline">
                                    <input type="tBSX" id="key-tBSX" name="key-tBSX" hidden/>
                                    <select class="layui-form-select" lay-filter="">
                                        <option value="">请选择图斑属性</option>
                                        <option value="01">露天矿场</option>
                                        <option value="02">堆煤场</option>
                                        <option value="03">洗煤厂</option>
                                        <option value="04">煤矸石堆</option>
                                        <option value="05">其他矿石堆场</option>
                                        <option value="06">选矿厂</option>
                                        <option value="07">选矿池</option>
                                        <option value="08">表土堆</option>
                                        <option value="09">内排土场</option>
                                        <option value="10">外排土场</option>
                                        <option value="11">废石堆</option>
                                        <option value="12">尾矿库</option>
                                        <option value="13">山建筑</option>
                                        <option value="14">塌陷坑</option>
                                        <option value="15">地裂缝</option>
                                        <option value="16">崩塌</option>
                                        <option value="17">滑坡</option>
                                        <option value="18">其他</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">所有权权属</label>
                                <div class="layui-input-inline">
                                    <input id="key-sHYQ" name="key-sHYQ" hidden/>
                                    <select class="layui-select" lay-filter="select-sHYQ">
                                        <option value="">请选择所有权权属</option>
                                        <option value="A">国有土地所有权</option>
                                        <option value="B">集体土地所有权</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">使用权权属</label>
                                <div class="layui-input-inline">
                                    <input id="key-sYQ" name="key-sYQ" hidden/>
                                    <select class="layui-select" lay-filter="select-sYQ">
                                        <option value="">请选择使用权权属</option>
                                        <option value="A">国有土地使用权</option>
                                        <option value="B">集体土地使用权</option>
                                        <option value="C">其他</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">修复情况</label>
                                <div class="layui-input-inline">
                                    <input id="key-zLQK" name="key-zLQK" hidden/>
                                    <select class="layui-select" lay-filter="">
                                        <option value="">请选择修复情况</option>
                                        <option value="A">未修复</option>
                                        <option value="B">正在修复</option>
                                        <option value="C">已修复完成</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">采矿权名称</label>
                                <div class="layui-input-inline">
                                    <input type="text" id="key-kQMC" name="key-kQMC" placeholder="请输入采矿权名称"
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
<div>
    <table class="layui-table" id="showTable" lay-filter="showTable"></table>
</div>
<script type="text/html" id="toolbar">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" lay-event="add" shiro:hasPermission="productivemineNew:add">添加</button>
        <button class="layui-btn layui-btn-sm" lay-event="batchDeleted" shiro:hasPermission="productivemineNew:delete">
            删除
        </button>
    </div>
</script>
<script type="text/html" id="tool">
    <a class="layui-btn layui-btn-xs" lay-event="location">查看位置</a>
    <a class="layui-btn layui-btn-xs" lay-event="uploadImage">现场图片</a>
    <a class="layui-btn layui-btn-xs" lay-event="edit" shiro:hasPermission="productivemineNew:update">编辑</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"
       shiro:hasPermission="productivemineNew:delete">删除</a>
</script>

</body>
</html>
<script src="../layui/layui.all.js"></script>
<script src="../js/core.util.js"></script>
<script>
    //获取token
    var token = CoreUtil.getData("access_token");
    //地址栏转义token中的#号
    var tokenQuery = token.replace("#", "%23");
    var tableIns1;
    var table = layui.table;
    var form = layui.form;
    var layer = layui.layer;
    var $ = jQuery = layui.jquery;
    var laydate = layui.laydate;

    layui.config({
        base: '../mods/'
        , version: '1.0'
    });
    layui.use(['table', 'layer', 'laydate', 'form', 'layarea', 'laytype','laypro'], function () {
        var layer = layui.layer
            , form = layui.form
            , layarea = layui.layarea
            , laypro = layui.laypro
            , laytype = layui.laytype;

        layarea.render({
            elem: '#area-picker',
            change: function (res) {
                //选择结果
                console.log(res);
            }
        });
        laytype.render({
            elem: '#area-type',
            change: function (res) {
                //选择结果
                console.log(res);
            }
        });
        laypro.render({
            elem: '#area-pro',
            change: function (res) {
                //选择结果
                console.log(res);
            }
        });
        var today = (new Date()).toLocaleDateString();
        laydate.render({
            elem: "#hCRQ",
            type: 'datetime',
            done: function (value, date, endDate) {

            }
        });
        laydate.render({
            elem: "#kQQXQ",
            min: today,
            max: '2080-10-14',
            type: 'date',
            done: function (value, date, endDate) {

            }
        });
        laydate.render({
            elem: "#kQQXZ",
            min: today,
            max: '2080-10-14',
            type: 'date',
            done: function (value, date, endDate) {

            }
        });
        laydate.render({
            elem: "#nXFSJ",
            min: today,
            max: '2080-10-14',
            type: 'date',
            done: function (value, date, endDate) {

            }
        });
        laydate.render({
            elem: "#fKSJ",
            min: today,
            max: '2080-10-14',
            type: 'date',
            done: function (value, date, endDate) {

            }
        });
        laydate.render({
            elem: "#ySSJ",
            min: today,
            max: '2080-10-14',
            type: 'date',
            done: function (value, date, endDate) {

            }
        });
        form.verify({
            J: [/^[\S]{0,7}$/, '中心点经度应不超过6位数字，且不能出现空格'],
            W: [/^[\S]{0,7}$/, '中心点纬度应不超过6位数字，且不能出现空格'],
            Z: [/^(?!(0[0-9]{0,}$))[0-9]{1,}[.]{0,}[0-9]{0,}$/, '面积需为正数，请重新输入'],
            Q: [/^(?!(0[0-9]{0,}$))[0-9]{1,}[.]{0,}[0-9]{0,}$/, '面积需为正数，请重新输入'],
            P: [/^(?!(0[0-9]{0,}$))[0-9]{1,}[.]{0,}[0-9]{0,}$/, '面积需为正数，请重新输入'],
            O: [/^(?!(0[0-9]{0,}$))[0-9]{1,}[.]{0,}[0-9]{0,}$/, '面积需为正数，请重新输入'],
            L: [/^[0-9]*$/, '输入错误，请输入数字'],
            D: [/^[0-9]*$/, '输入错误，请输入数字']
        });
        //加载table
        tableIns1 = table.render({
            elem: '#showTable',
            cellMinWidth: 210,
            height: 'full-80',
            contentType: 'application/json'
            , headers: {"authorization": token}
            , page: true //开启分页
            , url: '../productivemineNew/listByPage' //数据接口
            , method: 'POST'
            , parseData: function (res) { //将原始数据解析成 table 组件所规定的数据
                return {
                    "code": res.code, //解析接口状态
                    "msg": res.msg, //解析提示文本
                    "count": CoreUtil.isEmpty(res.data) ? 0 : res.data.total, //解析数据长度
                    "data": CoreUtil.isEmpty(res.data) ? null : res.data.records //解析数据列表
                }
            },
            cols: [
                [
                    {type: 'checkbox', fixed: 'left', sort: true},
                    {field: 'tBBH', width: 200, title: '图斑编号', fixed: 'left', sort: true},
                    {field: 'xZS', width: 150, title: '所在地市', sort: true},
                    {field: 'xZX', width: 150, title: '所在区县', sort: true},
                    {field: 'wZ', width: 150, title: '图斑位置', sort: true},
                    {field: 'tBMJ', width: 150, title: '图斑面积', width: 120, sort: true},
                    {field: 'kFX', width: 150, title: '中心点经度', sort: true},
                    {field: 'kFY', width: 150, title: '中心点纬度', sort: true},
                    {
                        field: 'sHLX', width: 120, title: '损毁类型', sort: true, templet: function (d) {
                            if (d.sHLX == "WS") {
                                return "挖损";
                            } else if (d.sHLX == "YZ") {
                                return "压占";
                            } else {
                                return "塌陷";
                            }
                        }
                    },
                    {
                        field: 'tBSX', width: 150, title: '图斑属性', sort: true, templet: function (d) {
                            if (d.tBSX == "LTKC1") {
                                return "露天矿场";
                            } else if (d.tBSX == "DMC") {
                                return "堆煤场";
                            } else if (d.tBSX == "XMC") {
                                return "洗煤厂";
                            } else if (d.tBSX == "MGSD") {
                                return "煤矸石堆";
                            } else if (d.tBSX == "QTKSDC") {
                                return "其他矿石堆场";
                            } else if (d.tBSX == "XKC") {
                                return "选矿厂";
                            } else if (d.tBSX == "XKC2") {
                                return "选矿池";
                            } else if (d.tBSX == "BTDC") {
                                return "表土堆场";
                            } else if (d.tBSX == "NPTC") {
                                return "内排土场";
                            } else if (d.tBSX == "WPTC") {
                                return "外排土场";
                            } else if (d.tBSX == "FSD") {
                                return "废石堆";
                            } else if (d.tBSX == "WKK") {
                                return "尾矿库";
                            } else if (d.tBSX == "GYGCJZ") {
                                return "工业广场建筑";
                            } else if (d.tBSX == "TXK") {
                                return "塌陷坑";
                            } else if (d.tBSX == "YQJC") {
                                return "油气井场";
                            } else if (d.tBSX == "YQCZ") {
                                return "油气场站";
                            } else if (d.tBSX == "ZYK") {
                                return "炸药库";
                            } else if (d.tBSX == "KSDL") {
                                return "矿山道路";
                            } else if (d.tBSX == "DLF") {
                                return "地裂缝";
                            } else if (d.tBSX == "BT") {
                                return "崩塌";
                            } else if (d.tBSX == "HP") {
                                return "滑坡";
                            } else if (d.tBSX == "QTTBSX") {
                                return "其他";
                            }
                        }
                    },
                    {
                        field: 'sDDL', width: 200, title: '三调地类', sort: true, templet: function (d) {
                            if (d.sDDL == "01") {
                                return "耕地";
                            } else if (d.sDDL == "02") {
                                return "园地";
                            } else if (d.sDDL == "03") {
                                return "林地";
                            } else if (d.sDDL == "04") {
                                return "草地";
                            } else if (d.sDDL == "05") {
                                return "商服用地";
                            } else if (d.sDDL == "06") {
                                return "工矿仓储用地";
                            } else if (d.sDDL == "07") {
                                return "住宅用地";
                            } else if (d.sDDL == "08") {
                                return "公共管理与公共服务用地";
                            } else if (d.sDDL == "09") {
                                return "特殊用地";
                            } else if (d.sDDL == "10") {
                                return "交通运输用地";
                            } else if (d.sDDL == "11") {
                                return "水域及水利设施用地";
                            } else if (d.sDDL == "12") {
                                return "其他用地";
                            }
                        }
                    },
                    {
                        field: 'sYQ', width: 180, title: '所有权权属', sort: true, templet: function (d) {
                            if (d.sYQ == "GYTDSYQ") {
                                return "国有土地所有权";
                            } else {
                                return "集体土地所有权";
                            }
                        }
                    },
                    {
                        field: 'sHYQ', width: 180, title: '使用权权属', sort: true, templet: function (d) {
                            if (d.sHYQ == "GYSYQ") {
                                return "国有土地使用权";
                            } else if (d.sHYQ == "JTSYQ") {
                                return "集体土地使用权";
                            } else {
                                return "其他";
                            }
                        }
                    },
                    {
                        field: 'yDSX', width: 180, title: '有无合法用地手续', sort: true, templet: function (d) {
                            if (d.yDSX == "1") {
                                return "有";
                            } else {
                                return "无";
                            }
                        }
                    },
                    {field: 'kQBH', width: 150, title: '采矿权证编号', sort: true},
                    {field: 'kQQXQ', width: 200, title: '采矿权证有效期起', sort: true},
                    {field: 'kQQXZ', width: 200, title: '采矿权证有效期止', sort: true},
                    {field: 'kQMC', width: 150, title: '采矿权名称', sort: true},
                    {field: 'xMDW', width: 150, title: '项目单位', sort: true},
                    {field: 'kZ', width: 120, title: '矿种', sort: true},
                    {
                        field: 'kCFS', width: 140, title: '开采方式', sort: true, templet: function (d) {
                            if (d.kCFS == "DXKC") {
                                return "地下开采";
                            } else if (d.kCFS == "LTKC") {
                                return "露天开采";
                            } else {
                                return "露井联采";
                            }
                        }
                    },
                    {
                        field: 'zLQK', width: 140, title: '修复情况', sort: true, templet: function (d) {
                            if (d.zLQK == "WZL") {
                                return "未修复";
                            } else if (d.zLQK == "ZZZL") {
                                return "正在修复";
                            } else {
                                return "已修复完成";
                            }
                        }
                    },
                    {field: 'zLMJ', width: 180, title: '实地治理面积', sort: true},
                    {field: 'nXFSJ', width: 200, title: '拟修复时间', sort: true},
                    {
                        field: 'xCZP', width: 180, title: '核查现场的照片', sort: true, templet: function (d) {
                            if (d.dd == null || d.dd == undefined) {
                                return "上传照片";
                            } else {
                                return "查看照片";
                            }
                        }
                    },
                    {field: 'hCDW', width: 160, title: '核查单位名称', sort: true},
                    {field: 'hCRY', width: 160, title: '核查人员姓名', sort: true},
                    {field: 'hCRQ', width: 200, title: '核查具体日期', sort: true},
                    // {field: 'qTDZ', width: 180, title: '切图文件存储地址', sort: true},
                    {field: 'sSZT', width: 180, title: '实施主体', sort: true},
                    {field: 'fKSJ', width: 200, title: '复垦/治理时间', sort: true},
                    {field: 'ySSJ', width: 200, title: '验收时间', sort: true},
                    {field: 'ySDW', width: 180, title: '组织验收单位', sort: true},
                    {
                        field: 'ySJL', width: 180, title: '验收结论', sort: true, templet: function (d) {
                            if (d.ySJL == "TG") {
                                return "通过";
                            } else if (d.ySJL == "YTJTG") {
                                return "有条件通过";
                            } else {
                                return "未通过，整改";
                            }
                        }
                    },
                    {field: 'fKFX', width: 260, title: '治理/复垦后土地利用类型', sort: true},
                    {field: 'zTTZ', width: 180, title: '总体投资（万元）', sort: true},
                    {fixed: 'right', width: 360, toolbar: "#tool", title: '操作'}
                ]
            ],
            toolbar: '#toolbar',
            done: function (res, curr, count) {
                // 该方法用于解决,使用fixed固定列后,行高和其他列不一致的问题
                $(".layui-table-body tr").each(function (index, val) {
                    $($(".layui-table-fixed .layui-table-body tbody tr")[index]).height($(val).height());
                });
                $(".layui-table-header  tr").each(function (index, val) {
                    $($(".layui-table-fixed .layui-table-header table tr")[index]).height($(val).height());
                });
            }
        });
        //表头工具
        table.on('toolbar(showTable)', function (obj) {
            switch (obj.event) {
                case 'batchDeleted':
                    var checkStatus = table.checkStatus(obj.config.id);
                    var data = checkStatus.data;
                    if (data.length == 0) {
                        layer.msg("请选择要批量删除的列");
                    } else {
                        var tBBHs = [];
                        $(data).each(function (index, item) {
                            tBBHs.push(item.tBBH);
                        });
                        tipDialog(tBBHs);
                    }
                    break;
                case 'add':
                    $(".operation input[name=tBBH]").val("");
                    $(".operation input[name=xZS]").val("");
                    $(".operation input[name=xZX]").val("");
                    $(".operation input[name=wZ]").val("");
                    $(".operation input[name=tBMJ]").val("");
                    $(".operation input[name=kFX]").val("");
                    $(".operation input[name=kFY]").val("");
                    $(".operation input[name=sHLX]").val("");
                    $(".operation input[name=tBSX]").val("");
                    $(".operation input[name=sDDL]").val("");
                    $(".operation input[name=sYQ]").val("");
                    $(".operation input[name=sHYQ]").val("");
                    $(".operation input[name=yDSX]").val("");
                    $(".operation input[name=kQBH]").val("");
                    $(".operation input[name=kQQXQ]").val("");
                    $(".operation input[name=kQQXZ]").val("");
                    $(".operation input[name=kQMC]").val("");
                    $(".operation input[name=xMDW]").val("");
                    $(".operation input[name=kZ]").val("");
                    $(".operation input[name=kCFS]").val("");
                    $(".operation input[name=zLQK]").val("");
                    $(".operation input[name=zLMJ]").val("");
                    $(".operation input[name=nXFSJ]").val("");
                    $(".operation input[name=xCZP]").val("");
                    $(".operation input[name=hCDW]").val("");
                    $(".operation input[name=hCRY]").val("");
                    $(".operation input[name=hCRQ]").val("");
                    $(".operation input[name=qTDZ]").val("");
                    $(".operation input[name=sSZT]").val("");
                    $(".operation input[name=fKSJ]").val("");
                    $(".operation input[name=ySSJ]").val("");
                    $(".operation input[name=ySDW]").val("");
                    $(".operation input[name=ySJL]").val("");
                    $(".operation input[name=fKFX]").val("");
                    $(".operation input[name=zTTZ]").val("");
                    layer.open({
                        type: 1,
                        skin: 'layui-layer-lan',
                        title: "添加信息",
                        shadeClose: true,
                        area: ['1050px', '550px'],
                        shade: 0.6,
                        maxmin: false,
                        anim: 1,
                        content: $('#productiveminAdd'),
                        cancel: function () {
                        },
                    });
                    break;
            }
        });
        //列操作
        table.on('tool(showTable)', function (obj) {
            var data = obj.data;
            switch (obj.event) {
                case 'del':
                    var tBBHs = [];
                    tBBHs.push(data.tBBH);
                    tipDialog(tBBHs);
                    break;
                case 'edit':
                    $(".operation input[name=tBBH]").val(data.tBBH);
                    $(".operation input[name=xZS]").val(data.xZS);
                    $(".operation input[name=xZX]").val(data.xZX);
                    $(".operation input[name=wZ]").val(data.wZ);
                    $(".operation input[name=tBMJ]").val(data.tBMJ);
                    $(".operation input[name=kFX]").val(data.kFX);
                    $(".operation input[name=kFY]").val(data.kFY);
                    $(".operation input[name=sHLX]").val(data.sHLX);
                    $(".operation input[name=tBSX]").val(data.tBSX);
                    $(".operation input[name=sDDL]").val(data.sDDL);
                    $(".operation input[name=sYQ]").val(data.sYQ);
                    $(".operation input[name=sHYQ]").val(data.sHYQ);
                    $(".operation input[name=yDSX]").val(data.yDSX);
                    $(".operation input[name=kQBH]").val(data.kQBH);
                    $(".operation input[name=kQQXQ]").val(data.kQQXQ);
                    $(".operation input[name=kQQXZ]").val(data.kQQXZ);
                    $(".operation input[name=kQMC]").val(data.kQMC);
                    $(".operation input[name=xMDW]").val(data.xMDW);
                    $(".operation input[name=kZ]").val(data.kZ);
                    $(".operation input[name=kCFS]").val(data.kCFS);
                    $(".operation input[name=zLQK]").val(data.zLQK);
                    $(".operation input[name=zLMJ]").val(data.zLMJ);
                    $(".operation input[name=nXFSJ]").val(data.nXFSJ);
                    $(".operation input[name=xCZP]").val(data.xCZP);
                    $(".operation input[name=hCDW]").val(data.hCDW);
                    $(".operation input[name=hCRY]").val(data.hCRY);
                    $(".operation input[name=hCRQ]").val(data.hCRQ);
                    $(".operation input[name=qTDZ]").val(data.qTDZ);
                    $(".operation input[name=sSZT]").val(data.sSZT);
                    $(".operation input[name=fKSJ]").val(data.fKSJ);
                    $(".operation input[name=ySSJ]").val(data.ySSJ);
                    $(".operation input[name=ySDW]").val(data.ySDW);
                    $(".operation input[name=ySJL]").val(data.ySJL);
                    $(".operation input[name=fKFX]").val(data.fKFX);
                    $(".operation input[name=zTTZ]").val(data.zTTZ);
                    layer.open({
                        type: 1,
                        skin: 'layui-layer-lan',
                        title: "编辑信息",
                        shadeClose: true,
                        area: ['1050px', '550px'],
                        shade: 0.6,
                        maxmin: false,
                        anim: 1,
                        content: $('#productiveminAdd'),
                        cancel: function () {
                        },
                    });
                    break;
                case 'location':
                    //自定页
                    layer.open({
                        title: '查看图斑位置',
                        type: 2,
                        closeBtn: 1, //不显示关闭按钮
                        area: ['80%', '90%'],
                        anim: 2,
                        shadeClose: true, //开启遮罩关闭
                        content: 'spotlocation.html'
                    });
                    break;
                case 'uploadImage':
                    //自定页
                    layer.open({
                        title: '上传现场图片',
                        type: 2,
                        closeBtn: 1, //不显示关闭按钮
                        area: ['80%', '90%'],
                        anim: 2,
                        shadeClose: true, //开启遮罩关闭
                        content: CoreUtil.getContext() + '/spotfile/upload?tbbh=' + data.tBBH
                    });
                    break;
            }
        });

        form.on('select(select-sHLX)', function (data) {
            $("#sHLX").val(data.value);
        });
        form.on('select(select-kZ)', function (data) {
            $("#kZ").val(data.value);
        });
        form.on('select(select-tBSX)', function (data) {
            $("#tBSX").val(data.value);
        });
        form.on('select(select-sDDL)', function (data) {
            $("#sDDL").val(data.value);
        });
        form.on('select(select-zLQK)', function (data) {
            $("#zLQK").val(data.value);
        });
        form.on('select(select-kCFS)', function (data) {
            $("#kCFS").val(data.value);
        });
        form.on('select(select-yDSX)', function (data) {
            $("#yDSX").val(data.value);
        });
        form.on('select(select-sHYQ)', function (data) {
            $("#sHYQ").val(data.value);
        });
        form.on('select(select-sYQ)', function (data) {
            $("#sYQ").val(data.value);
        });
        form.on('select(select-ySJL)', function (data) {
            $("#ySJL").val(data.value);
        });
        $(".more-btn").click(function () {
            if ($(".more-container").is(":hidden")) {
                $(".more-container").show(); //如果元素为隐藏,则将它显现
                $(".more-btn").html('<i class="layui-icon layui-icon-subtraction"></i>收起')
            } else {
                $(".more-container").hide(); //如果元素为显现,则将其隐藏
                $(".more-btn").html('<i class="layui-icon layui-icon-addition"></i>展开')
            }
            return false;
        })
        //导出
        $('#export').on('click', function () {
            //原先分页limit
            var exportParams = {
                limit: 10000,
                key: $("#key").val()
            };
            CoreUtil.sendPost("/productivemineNew/listByPage", exportParams, function (res) {
                //初始化渲染数据
                if (res.data != null && res.data.records != null) {
                    table.exportFile(tableIns1.config.id, res.data.records, 'xls');
                }
            });
        });

        //删除
        var tipDialog = function (tBBHs) {
            layer.open({
                content: "确定要删除么?",
                yes: function (index, layero) {
                    layer.close(index); //如果设定了yes回调，需进行手工关闭
                    CoreUtil.sendDelete("/productivemineNew/delete", tBBHs, function (res) {
                        layer.msg(res.msg, {time: 1000}, function () {
                            search();
                        });
                    });
                }
            });
        };

        //返回
        $("#btn_cancel").click(function () {
            $(".table_div").show();
            $(".operation").hide();
            layer.closeAll();
            return false;
        });

        //监听保存
        form.on('submit(submit)', function (data) {
            if (data.field.tBBH === undefined || data.field.tBBH === null || data.field.tBBH === "") {
                CoreUtil.sendPost("/productivemineNew/add", data.field, function (res) {
                    $(".table_div").show();
                    layer.msg('添加成功', {time: 1000},)
                    $(".operation").hide();
                    layer.closeAll();
                    search();
                });
            } else {
                CoreUtil.sendPut("/productivemineNew/update", data.field, function (res) {
                    $(".table_div").show();
                    layer.msg('修改成功', {time: 1000},)
                    $(".operation").hide();
                    layer.closeAll();
                    search();
                });
            }

            return false;
        });
    });

    //执行查询
    function search() {
        //这里以搜索为例
        tableIns1.reload({
            where: { //设定异步数据接口的额外参数，任意设
                TBBH: $("#key").val(),
            }
            , page: {
                curr: 1 //重新从第 1 页开始
            }
        });
    };
</script>
